Repository navigation
Conversation
The validator used bit counts as hex digit quantifiers for BLAKE3
("256,") and MD6 ("0,512"). A standard 256-bit BLAKE3 digest
(64 hex digits) was rejected and an empty MD6 value was accepted.
BLAKE3 now needs at least 64 hex digits (256 bits) and MD6 between
1 and 128 hex digits (at most 512 bits).
Fixes spdx#915
Signed-off-by: Italo Armenti <italo.armenti@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
checksum_validator.pyused bit counts as hex-digit quantifiers for BLAKE3 ("256,") and MD6 ("0,512"). A standard 256-bit BLAKE3 digest (64 hex digits) was rejected, and an empty MD6 value was accepted.BLAKE3 now needs at least 64 hex digits (256 bits, the default output, which can be extended), and MD6 1 to 128 hex digits (at most 512 bits). The validation messages say the same.
Updated the two existing expected messages and added cases for a 64-digit BLAKE3, a 128-digit MD6, an empty MD6 and a 129-digit MD6. The full test suite passes, and isort/black/flake8 are clean.
Fixes #915